package app;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "room_list")
public class RoomList {

    List<Room> roomList;


    public RoomList() {
        this.roomList = new ArrayList();
    }

    public RoomList(List<Room> roomList) {
        this.roomList = roomList;
    }

    public void add(Room room){
        roomList.add(room);
    }
    
    @XmlElements({
        @XmlElement(name = "room", type = Room.class)})
    @XmlElementWrapper
    public List<Room> getRoomList() {
        return roomList;
    }

    public void setRoomList(ArrayList<Room> roomList) {
        this.roomList = roomList;
    }
}
